package com.teach.dao.impl;

import com.teach.entity.AdminInfo;
import com.teach.dao.AdminInfoDAO;
import com.teach.util.DBUtil;
import com.teach.util.DBUtil.BaseDAOImpl;

import java.sql.SQLException;

/**
 * <pre>
 * - 管理员数据访问实现类
 * Author : J.L.Zhou
 * E-Mail : 12020042@qq.com
 * Tel : 151 1104 7708
 * Date : 2022-05-04 13:46
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 */
public class AdminInfoDAOImpl extends BaseDAOImpl<AdminInfo> implements AdminInfoDAO {

  @Override
  public AdminInfo selectByName(String name) throws SQLException {
    String sql = "select * from admin_info where admin_name=?";
    return DBUtil.selectOne(sql,AdminInfo.class, name);
  }
}
